﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/PopupDiv.master"
    AutoEventWireup="true" CodeBehind="PictureBatchAdd.aspx.cs" Inherits="Cms.Admin.Picture.PictureBatchAdd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="../../Common/Js/attach.js"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="height: 5px; line-height: 5px;">
    </div>
    <asp:Panel ID="pnlMain" runat="server" Width="100%" Style="height: 129px;">
        <table border="0" cellpadding="0" cellspacing="0" style="margin-left:20px;" align="center">
            <tr>
                <td style="width: 80px">
                    <script type="text/javascript">
                        new ImageUpload("fileList", "pic");
                    </script>

                </td>               
            </tr>
            <tr>
                <td>
                    <div id="fileList" style="width:350px; height:90px; background-color:#EFEFEF; overflow:auto;">
                    </div>
                </td>
            </tr>
        </table>
    </asp:Panel>
    <div id="lblMessage" style="display: none; text-align: center; line-height: 129px;">
        正在提交数据，请稍候...</div>

    <script type="text/javascript">

        var form = document.forms[0];

        function form_submit()
        {

            window.setTimeout(function()
            {
                var btnSave = document.getElementById("<%=btnSave.ClientID %>");
                document.getElementById("lblMessage").style.display = "";
                document.getElementById("<%=pnlMain.ClientID %>").style.display = "none";
                btnSave.onclick = function()
                {
                    alert("正在提交数据，请不要重复提交");
                    return false;
                }
            }, 1);
           
        }

        if (form.attachEvent)
        {
            form.attachEvent("onsubmit", form_submit);
        }
        else if (form.addEventListener)
        {
            form.addEventListener("submit", form_submit, false);
        }
        
    </script>

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" />
</asp:Content>
